\section{Compiling and running the program}

    \subsection{Compiling the program}
    
        To compile our program, \textit{Javac} is needed and must be in your \textit{PATH} environment variable.\\
        Open a shell and go in the directory where source folder (\textit{src}) are located. 
        
        Then execute the following command line :
        \begin{verbatim}
            javac -d bin/ -extdirs libs/ -sourcepath src/ src/AIProjectMain.java
        \end{verbatim}

    \subsection{Running the program}
    
    
        Open the simulation environment, \textit{MRDS}, by executing
        \begin{verbatim}
             C:/MRDS4/store/launchers/StartLokarria.bat
        \end{verbatim}    

        Open a shell and go bin directory (bin) which has been created during compiling process and execute the    following command line (be careful the wildcard character for importing all libraries from directory libs works only with a Java version 6 and above, if it does not work you will have to specify each jar file in the classpath):
        \begin{verbatim}
            java -cp ../libs/'*';. AIProjectMain
        \end{verbatim}

        If no argument is specified, program will ask to enter a path to a JSON file describing the path and will run with default values. Otherwise, you must specify the path argument.
        
         \subsubsection{Program arguments}
         
             \begin{tabular}{|l|l|p{12cm}|}
             \hline 
             \textbf{Argument} & \textbf{Type} & \textbf{Description} \\ 
             \hline 
             \textbf{-{}-path} & string & Path to a JSON file describing a path \\ 
             \hline 
            \textbf{-{}-lookahead}  & float & Value of look ahead distance \\ 
             \hline 
            \textbf{-{}-edistance}  & float & Tolerated error when moving to a point. \\ 
             \hline 
             \textbf{-{}-maxp} & integer & Maximum of point which can be taken in an iteration of pure pursuit algorithm. \\ 
             \hline 
            \textbf{-{}-debug}  & boolean & activate debug mode : true / false \\ 
             \hline 
             \textbf{-{}-speed}  & float & set a constant linear speed for the robot \\ 
             \hline 
             \textbf{-{}-dspeed}  & boolean & activate dynamic speed mode : true / false \\ 
             \hline 
             \textbf{-{}-avoidob}  & boolean & activate the obstacle avoidance algorithm : true / false \\ 
             \hline 
             
             \end{tabular} 
        